cmake_minimum_required(VERSION 3.8)
project(pcl_convert)

if(CMAKE_COMPILER_IS_GNUCXX OR CMAKE_CXX_COMPILER_ID MATCHES "Clang")
  add_compile_options(-Wall -Wextra -Wpedantic)
endif()

# find dependencies
find_package(ament_cmake REQUIRED)
# uncomment the following section in order to fill in
# further dependencies manually.
# find_package(<dependency> REQUIRED)
find_package(rclcpp REQUIRED)
find_package(sensor_msgs REQUIRED)
find_package(PCL REQUIRED)
find_package(pcl_conversions REQUIRED)

add_executable(convert_node src/node.cpp)
target_include_directories(convert_node PUBLIC ${PCL_INCLUDE_DIRS})
ament_target_dependencies(convert_node rclcpp sensor_msgs pcl_conversions)
target_link_libraries(convert_node ${PCL_LIBRARIES})

install(
  TARGETS convert_node
  DESTINATION lib/${PROJECT_NAME}
)

install(
  DIRECTORY launch
  DESTINATION share/${PROJECT_NAME}
)

ament_package()
